package com.carkeeper.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author ：XXX
 * @date ：Created in 2020/6/3
 * @description ：
 * @version: 1.0
 */
@Data
@TableName(value = "tb_component",resultMap = "componentMapper",autoResultMap = true)
public class ComponentPO extends AbstractBasePO {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;         //服务ID
    private String code;    //配件编码
    private String businessCode;    //配件商编码
    private String businessName;  //配件商名称
    private String componentName;   //配件名称
    private Long componentTypeId;     //一级服务分类id
    private Long componentSubTypeId;  //二级服务分类id
    private String typeName;      //分类名称
    private Long componentBrandId;         //品牌
    private String specification;       //规格型号
    private BigDecimal price;           //价格
    private String supplier;          //供应商名称
    private String factoryName;       //生产厂家
    private String alias;             //别名
    private int state;      //状态,是否上下架
    @TableField(exist = false)
    @JsonProperty(value = "store")
    private StorePO storePo;//商家信息
    @TableField(exist = false)
    @JsonProperty(value = "componentType")
    private CompTypePO compTypePO;//一级分类信息
    @TableField(exist = false)
    @JsonProperty(value = "componentSubType")
    private CompTypePO compSubTypePO;//二级分类信息
    @TableField(exist = false)
    @JsonProperty(value = "componentBrand")
    private ComponentBrandPO componentBrandPO;//配件品牌
}
